using System.Collections.Generic;
using System.IO;

namespace Pronghorn.Core
{
	public abstract class WidgetBase : IWidget, IRenderable
	{
		#region Constructors

		protected WidgetBase(IProngHornControllerContext controllerContext)
		{
			ControllerContext = controllerContext;
		}

		#endregion Constructors

		#region Public Properties

		public IProngHornControllerContext ControllerContext
		{
			get; private set;
		}

		public string Name
		{
			get; set;
		}

		public string Rendered
		{
			get; protected set;
		}

		public IList<string> Scripts
		{
			get; set;
		}

		public IList<string> StyleSheets
		{
			get; set;
		}

		public string Title
		{
			get; set;
		}

		public IList<IWidget> Widgets
		{
			get; set;
		}

		#endregion Public Properties

		#region Public Methods

		public abstract void Render(TextWriter writer);

		#endregion Public Methods
	}
}